-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ivs-alpha): support advanced channel type #30086
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly documentation nits, LGTM otherwise 👍
@@ -69,6 +70,42 @@ export enum ChannelType { | |||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These @see
tags should be moved to the enum TSDoc, no need to repeat them if they're pointing to the same link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmussy
Thank you for your review!
I moved @see
to the enum TSDoc.
export enum Preset { | ||
/** | ||
* Use a lower bitrate than STANDARD for each quality level. Use it if you have low download bandwidth and/or simple video content (e.g., talking heads). | ||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, @see
should be moved to the Preset
TSDoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, I moved to the enum docs.
new IntegTest(app, 'ivs-test', { | ||
testCases: [stack], | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can run some assertions to make sure that the configurations are created properly, see integ-tests. Let me know if you need help setting them up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmussy
I added assertions to the integ tests.
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
const resource = new CfnChannel(this, 'Resource', { | ||
authorized: props.authorized, | ||
latencyMode: props.latencyMode, | ||
name: this.physicalName, | ||
type: props.type, | ||
preset: props.preset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking into account the revisions after the review, I changed it to set props.preset directly.
This is because if ChannelType is ADVANCED_SD or ADVANCED_HD, even if preset becomes undefined, Cfn will set the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once again, you can use the shorthand:
preset: props.preset, | |
preset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
I had a misunderstanding about the shorthand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh no, I'm the one who made the mistake here, it doesn't work sorry 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmussy
No problem. I reverted it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more nits, looks good otherwise 👍
const resource = new CfnChannel(this, 'Resource', { | ||
authorized: props.authorized, | ||
latencyMode: props.latencyMode, | ||
name: this.physicalName, | ||
type: props.type, | ||
preset: props.preset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once again, you can use the shorthand:
preset: props.preset, | |
preset, |
}) | ||
.expect(integ.ExpectedResult.objectLike({ | ||
channel: { | ||
preset: 'HIGHER_BANDWIDTH_DELIVERY', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, we're testing the Cfn default value here 👍
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
Co-authored-by: Jimmy Gaussen <jimmy.gaussen@gmail.com>
60e2606
to
275b495
Compare
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
### Issue # (if applicable) Closes aws#30075 ### Reason for this change As described in the issue. ### Description of changes * Add `ADVANCED_HD` and `ADVANCED_SD` to the `ivs.ChannelType`. * Add `preset` property to the Channel Construct. Additionally, validation has been implemented to allow setting the preset property only when using the Advanced channel type ### Description of how you validated changes Add both unit tests and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
### Issue # (if applicable) Closes aws#30075 ### Reason for this change As described in the issue. ### Description of changes * Add `ADVANCED_HD` and `ADVANCED_SD` to the `ivs.ChannelType`. * Add `preset` property to the Channel Construct. Additionally, validation has been implemented to allow setting the preset property only when using the Advanced channel type ### Description of how you validated changes Add both unit tests and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Issue # (if applicable)
Closes #30075
Reason for this change
As described in the issue.
Description of changes
ADVANCED_HD
andADVANCED_SD
to theivs.ChannelType
.preset
property to the Channel Construct. Additionally, validation has been implemented to allow setting the preset property only when using the Advanced channel typeDescription of how you validated changes
Add both unit tests and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license